package com.bcx.crm.spring_boot.springMVC.controllerAdvice;

import com.bcx.crm.spring_boot.springMVC.domain.DemoObj;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by ys on 2018/4/22.
 * 请求路径 : http://localhost:8282/crm/advice?id=1&name=xx
 */
@Controller
public class AdviceController {
    @RequestMapping("/advice")
    public String getSomething(@ModelAttribute("msg")String msg, DemoObj demoObj){
        throw new IllegalStateException("非常抱歉，参数有误/"+"来自@ModelAttribute:"+msg);
    }

}
